<%-- 
    Document   : FilterDialog
    Created on : Jun 14, 2010, 2:38:52 PM
    Author     : dakhoa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <jsp:include page="../include/header.jsp" />

        <script>

            $.ajaxSetup({
                error: function (xhr, status, index, anchor) {
                    hideOverlay();
                    showMsg("Ajax load error: " + xhr.responseText, 'warn')
                }
            });



            jQuery(document).ready(function(){

                jQuery("#list2").jqGrid(
                {
                    url:'filter.jsp?_a=handleTableData',
                    datatype: "json",
                    colNames:['Inv No','Date', 'Client', 'Amount','Tax','Total','Notes'],
                    colModel:[ {
                            name:'id',
                            index:'id',
                            width:55
                        }, {
                            name:'invdate',
                            index:'invdate',
                            width:90
                        }, {
                            name:'name',
                            index:'name asc, invdate',
                            width:100
                        }, {
                            name:'amount',
                            index:'amount',
                            width:80,
                            align:"right"
                        }, {
                            name:'tax',
                            index:'tax',
                            width:80,
                            align:"right"
                        }, {
                            name:'total',
                            index:'total',
                            width:80,
                            align:"right"
                        }, {
                            name:'note',
                            index:'note',
                            width:150,
                            sortable:false
                        } ],
                    rowNum:10,
                    rowList:[10,20,30],
                    pager: '#pager2',
                    sortname: 'id',
                    viewrecords: true,
                    sortorder: "desc",
                    caption:"JSON Example"
                });
            
                jQuery("#list2").jqGrid('navGrid','#pager2',{
                    edit:false,
                    add:false,
                    del:false
                });
            });
        </script>

    </head>
    <body>
        <h1>Hello World! This is filter dialog</h1>

        <div id="msgTd"/>

        <table id="list2"></table>
        <div id="pager2"></div>

    </body>
</html>
